{extend name="$base" /}
{block name="resources"} {/block}
{block name="right_tab"}
<!-- <li><a class="nscs-table-handle_green" href="javascript:;" onclick="addBrand()"><i class="fa fa-plus-circle"></i>&nbsp;添加品牌</a></li> -->
{/block}
{block name="main"}
<div class="mod-table">
	<div class="mod-table-head">
		<div class="con style0list">
			<table class="table-class">
				<colgroup>
					<col style="width: 5%;">
					<col style="width: 10%;">
					<col style="width: 10%;">
					<col style="width: 10%;">
					<col style="width: 10%;">
					<col style="width: 10%;">
					<col style="width: 15%;">
				</colgroup>
				<thead>
					<tr>
						<th><label style="margin-left: 5px;"> <input type="checkbox"  ></label></th>
						<th>店铺Id</th>
						<th>分红开始时间</th>
						<th>分红结束时间</th>
						<th>分红总金额</th>
						<th>创建时间</th>
						<th>操作</th>
					</tr>
				</thead>
				<colgroup>
					<col style="width: 5%;">
					<col style="width: 10%;">
					<col style="width: 10%;">
					<col style="width: 10%;">
					<col style="width: 10%;">
					<col style="width: 10%;">
					<col style="width: 15%;">
				</colgroup>
				<tbody></tbody>
			</table>
		</div>
	</div>
</div>
{/block}
{block name="script"}
{include file="admin/pageCommon" /}
<script type="text/javascript">
	//加载数据
	function LoadingInfo(pageIndex) {
		$.ajax({
			type : "post",
			url : "{:__URL('__URL__/nsfx/ADMIN_MODULE/distribution/commissionpartnerglobalrecordslist')}",
			data : {
				"pageIndex" : pageIndex
			},
			success : function(data) {
				$("#page_count").val(data["page_count"]);
				$("#pageNumber a").remove();
				var html = '';
				if (data["data"].length > 0) {
					for (var i = 0; i < data["data"].length; i++) {
						html += '<tr align="center">';
						html += '<td><div class="cell"><label ><input name="sub" type="checkbox" value="'+ data["data"][i]["id"] +'" ></label></div></td>';
						html += '<td>' + data["data"][i]["shop_id"] + '</td>';
						html += '<td>' + timeStampTurnTime(data["data"][i]["start_time"]) + '</td>';
						html += '<td>' + timeStampTurnTime(data["data"][i]["end_time"]) + '</td>';
						html += '<td>' + data["data"][i]["fenhong_money"] + '</td>';
						html += '<td>' + timeStampTurnTime(data["data"][i]["create_time"]) + '</td>';
						html += '<td><a href="'+__URL('__URL__/nsfx/ADMIN_MODULE/commission/commissionpartnergloballist?records_id='+data["data"][i]["id"])+'" >查看</a></td> ';
						html += '</tr>';
					}
				} else {
					html += '<tr align="center"><td colspan="10">暂无符合条件的数据记录</td></tr>';
				}
				
				$(".style0list tbody").html(html);
				var totalpage = $("#page_count").val();
				if (totalpage == 1) {
					changeClass("all");
				}
				initPageData(data["page_count"],data['data'].length,data['total_count']);
				var $html = pagenumShow(jumpNumber,totalpage,{$pageshow});
				$("#pageNumber").append($html);
			}
		});
	}	
	//全选
	function CheckAll(event){
		var checked = event.checked;
		$(".style0list tbody input[type = 'checkbox']").prop("checked",checked);
	}
</script>
{/block}